﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Pout_Porri.Objects.Interface;
using Pout_Porri.Utils;


namespace Pout_Porri.Objects
{
    class Flower : Enemy
    {
        private Animation flowerStand;

        public Flower(Texture2D image, Vector2 position, Vector2 velocity) : base(image, position, velocity)
        {
            this.texture = image;
        }

        public override void configAnimations()
        {
            flowerStand = new Animation("flowerstand", new Vector2(84, 84), 250, 10, 2, 12, Axis.X);
            this.addAnimation(flowerStand);

            this.spriteTexture = new Texture2D(Game1.graphics.GraphicsDevice, 84, 84);
            /*
            this.spriteTexture = Utils.Util.CreatePartImage(AnimationRect(flowerStand), this.texture);
            Utils.Util.SaveSprite("Content\\Images\\Mario\\flowerstand.png", this.spriteTexture);
             */
            
            this.setCurrentAnimation("flowerstand");
            currentState = EnemyStates.stand;
        }

        public override void update(GameTime gameTime)
        {
            
            if (currentState == EnemyStates.stand)
            {
                this.setCurrentAnimation("flowerstand");
                this.currentAnimationRect = this.AnimationRect(flowerStand);
                
            }
     
            base.update(gameTime);
        }

       
       
    }
}
